package reflect;

public class Person {
    private String name="zs";
    private int age=22;

    public Person() {
    }

    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }

    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }

    public void sayhi(){
        System.out.println(name+"sayhi");
    }
    public void saygoodby(){
        System.out.println(name+"saygoodby");
    }
   public void say(String info){
        System.out.println(name+":"+info);
    }
    public void say(String info,int cont){
        for (int i=0;i<cont;i++){
            System.out.println(name+":"+info);
        }
    }
    private void heiehi(){
        System.out.println("我是私有");
    }
}
